<template>
  <view class="w226 h222 ty-circle-img f-c-c" :class="set_bg_color">
    <view class="f-c-b h80" style="display: flex; align-items: center">
      <text class="font700 f-c-c h70 mr-05" :class="setnss">{{
        item.type == 1 ? item.couponFee : item.rebate
      }}</text
      >{{ item.type == 1 ? "元" : "折" }}
    </view>
  </view>
</template>

<script>
export default {
  props: {
    item: {},
    money: {
      default: 0,
    },
    money_bg: {
      default: "bg-white",
    },
    type: {},
    rebate: {},
  },
  computed: {
    set_bg_color() {
      if (this.item.status == 0) {
        return "bg-e4";
      } else {
        return this.item.type == 1 ? "bg-theme_5" : "bg-er";
      }
    },
    setnss() {
      let xd = "font40";
      if (this.item.couponFee < 1000) {
        xd = "font88";
        if (this.item.type == 1 && this.item.couponFee.toString().length > 4) {
          xd = "font45";
        }
      }
      return xd;
    },
  },
};
</script>
